function roleUserDialog(
    {
        roleId,
        title,
        roleSign,
        callback = Function()
    }
) {
    const $widget = $(`
        <div class="">
            <form data-form="search">
                <div class="audit-top pt0 pl0">
                    <input type="hidden" name="roleId" value="${roleId}">
                    <input type="hidden" name="disableFlag" value="0">
                    <span>关键字</span>
                    <span class="input-select">
                        <input type="text" name="titleLike" value="" placeholder="名称，手机号，邮箱模糊搜索"/>
                    </span>
                    <a class="search-btn ml-20" href="javascript:" data-btn="search">搜索</a>
                    <a data-btn="addUser" class="search-btn ml-10 btn-line" href="javascript:" >新增</a>
                </div>
            </form>
            <div data-list="content" class="table-con" style="box-shadow: none;padding: 10px 0 0 0"></div>
        </div>
    `);

    const $dialogWidget = $.dialog($widget, {
        title: title,
        width: "80%",
        cancel: null,
        ok: null
    })

    $dialogWidget.find('[data-type="content"]').css({
        "max-height": "600px",
        "overflow": "auto"
    })

    const $searchForm = $widget.find('[data-form="search"]');
    const $listWarp = $widget.find('[data-list="content"]');


    const listHandler = $.commonList({
        $warp: $listWarp,
        column: [
            {title: "用户名", value: "userName"},
            {title: "手机", value: "phone"},
            {title: "邮箱", value: "email"},
            {
                title: "操作", value: data => {
                    const $delBtn = $('<a href="javascript:" class="c-btn btn-red m5">删除</a>');

                    $delBtn.on("click", () => {
                        delRoleUserDialog({
                            userId: data.userId,
                            roleId,
                            callback() {
                                listHandler.getPage();
                                callback();
                            }
                        })
                    })

                    //控制操作按钮
                    const $dom = $('<div></div>');
                    $dom.append($delBtn);

                    return $dom;
                }
            },
        ],
        dataSource: (currPage, callback) => {
            const param = $.getFormData($searchForm);
            param.pageIndex = currPage;
            param.pageSize = 10;
            queryUserPage(param, ({Code, Message, Result = [], Total}) => {
                if (Code !== 10000) {
                    return callback(Message, 0);
                }

                return callback(Result, Total, param.pageSize);
            });
        }
    });

    //搜索按钮
    $searchForm.find('[data-btn=search]').on("click", () => {
        listHandler.getPage();
    });

    //新增按钮
    $searchForm.find('[data-btn=addUser]').on("click", () => {
        addRoleUserDialog({
            roleId,
            callback() {
                listHandler.getPage(1);
                callback();
            }
        })
    });


    return $dialogWidget;

    function queryUserPage(param, callback = Function()) {
        return $.sApi({
            data: param,
            url: "/api/User/queryUserPage"
        }, callback)
    }
}